#ifndef __CONFIGURATION_H__
#define __CONFIGURATION_H__
#include <stdlib.h>
#include <string>
#include <unordered_map>
using std::string;
using std::unordered_map;

/*配置程序设置为单例模式，解决线程安全问题*/

class Configuration {
public:
    static Configuration *getInstance();
    unordered_map<string, string> &getConfigMap();

private:
    Configuration(const string &);
    ~Configuration() {};

    void loadConf();

    static void destroy();

    string _filepath;
    unordered_map<string, string> _configMap; 
    static Configuration *_pInstance;
};

#endif
